package cn.zyl.demo.common.boot.enums;

import cn.zyl.demo.common.boot.abs.AbsResCode;

/**
 * ResCodeEnum枚举说明:通用的请求响应码
 *
 * @author wsz
 * @version v1.0
 * @date 2020-07-31
 */
public enum ResCodeEnum implements AbsResCode {
    /**请求成功*/
    SUCCESS(200,"请求成功"),
    /**请求异常*/
    ERROR(500,"发生异常"),
    /**请求失败*/
    FAIL(999,"请求失败"),
    ;
    private final int code;
    private final String msg;
    ResCodeEnum(int code,String msg){
        this.code = code;
        this.msg = msg;
    }
    @Override
    public int getCode() { return code; }
    @Override
    public String getMsg() { return msg; }
}
